package ch.elektroplan.cmueller.logikModulGenerator.presentation;

import java.awt.BorderLayout;
import java.util.ArrayList;

import javax.swing.JFrame;

import ch.elektroplan.cmueller.logikModulGenerator.business.elements.Formel;
import ch.elektroplan.cmueller.logikModulGenerator.business.elements.HS_Information;
import ch.elektroplan.cmueller.logikModulGenerator.business.elements.Input;
import ch.elektroplan.cmueller.logikModulGenerator.business.elements.MemoryVariable;
import ch.elektroplan.cmueller.logikModulGenerator.business.elements.Output;
import ch.elektroplan.cmueller.logikModulGenerator.presentation.subs.GenerateButtopPanel;
import ch.elektroplan.cmueller.logikModulGenerator.presentation.subs.HS_informationPanel;
import ch.elektroplan.cmueller.logikModulGenerator.presentation.subs.MakeInputPanel;
import ch.elektroplan.cmueller.logikModulGenerator.presentation.subs.MakeMemoryPanel;
import ch.elektroplan.cmueller.logikModulGenerator.presentation.subs.MakeOutPut;

public class Mainframe extends JFrame{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	

	private HS_informationPanel hs_informationPanel;
	private GenerateButtopPanel generateButtopPanel;
	private MakeInputPanel makeInputPanel;
	private MakeOutPut makeOutPut;
	private MakeMemoryPanel makeMemoryPanel;
	private ArrayList<Input> inputs;
	private ArrayList<Output> outputs;
	private ArrayList<MemoryVariable> memoryVariables;
	private HS_Information hs_Information;
	private Formel formel;
	
	public Mainframe(){
		
		inputs = new ArrayList<Input>();
		outputs = new ArrayList<Output>();
		memoryVariables = new ArrayList<MemoryVariable>();
		hs_Information = new HS_Information();
		formel = new Formel();
		
		this.hs_informationPanel = new HS_informationPanel(hs_Information);
		this.generateButtopPanel = new GenerateButtopPanel(inputs, outputs, memoryVariables, hs_Information, formel);
		this.makeInputPanel = new MakeInputPanel(inputs);
		this.makeOutPut = new MakeOutPut(outputs);
		this.makeMemoryPanel = new MakeMemoryPanel(memoryVariables);
		
		setName("mainframe");
		
		this.setSize(1630, 600);
		this.setDefaultCloseOperation(EXIT_ON_CLOSE);
		
		this.add(hs_informationPanel,BorderLayout.NORTH);
		this.add(makeInputPanel,BorderLayout.WEST);
		this.add(makeOutPut, BorderLayout.CENTER);
		this.add(makeMemoryPanel,BorderLayout.EAST);
		
		this.add(generateButtopPanel, BorderLayout.SOUTH);
		
		this.setVisible(true);
	}

}
